#ifndef __LINKSTACK_H__
#define __LINKSTACK_H__

#include "../linklist/linklist.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"

#define null NULL

typedef void LinkStack;
typedef void LinkStackNode;

typedef struct _tag_LinkStackNode
{
    LinkListNode node;   // 链表的业务节点
    LinkStackNode *item; // 栈的业务节点
} TLinkStackNode;

typedef struct func_LinkStack
{
    LinkStack *(*create)();
    int (*destroy)(LinkStack *);
    int (*clear)(LinkStack *);
    int (*length)(LinkStack *);
    int (*push)(LinkStack *, LinkStackNode *);
    LinkStackNode *(*top)(LinkStack *);
    LinkStackNode *(*pop)(LinkStack *);
} func_LinkStack;

func_LinkStack fun_LinkStack;

#endif
